﻿using System;
using System.Web.UI.WebControls;
using Skyhook.ProjectViewer.WebAspNet.Projects.AspGridView.Objects;

namespace Skyhook.ProjectViewer.WebAspNet.Projects.AspGridView {
    public partial class AspGridView : System.Web.UI.Page {
        protected void gvImages_PreRender(object sender, EventArgs e) {
            var aspGridView_Item = AspGridView_Item.GetAll();
            gvImages.DataKeyNames = new[] { "Id" };
            gvImages.DataSource = aspGridView_Item;
            gvImages.DataBind();
        }

        protected void gvImages_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            switch(e.CommandName)
            {
                case "Select":
                    // Get selected image
                    break;
            }
        }
    }
}
